<template>
    <div class="block" :style="{height:height+'px'}">
      <el-carousel type="always" :height="height+'px'">
        <el-carousel-item v-for="item in imgdata" :key="item.id">
          <router-link :to="{path:item.url}"  target="_blank">
            <div class="imgBJ" :style="{backgroundImage: 'url(' + item.src + ')'}"></div>
          </router-link>
        </el-carousel-item>
      </el-carousel>
    </div>
</template>

<script type="text/ecmascript-6">
export default {
  data() {
    return {};
  },
  props: ["imgdata", "height"],
  methods: {},
  components: {}
};
</script>

<style lang="scss" type="text/css" >
@import "../../common/style.scss";

.block {
  margin: 0 auto;
  width: 100%;
  .imgBJ {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
  }
}

</style>
